11166132c7cecabf61fd19e6ec5901c68d52741a,src/test/java/com/graphhopper/matching/MapMatchingTest.java,MapMatchingTest,testCheckOrRepair,#,212

Before Change


        // incorrect orientation
        list.add(new EdgeMatch(GHUtility.getEdge(graph, 880, 24596), Collections.<GPXExtension>emptyList()));
        // duplicate edge        
        list.add(new EdgeMatch(GHUtility.getEdge(graph, 880, 24596), Collections.<GPXExtension>emptyList()));

        try {
            mm.checkOrCleanup(list, false);

After Change


        // System.out.println(GHUtility.getNeighbors(graph.createEdgeExplorer().setBaseNode(24594)));
        EdgeFilter filter = new DefaultEdgeFilter(encoder);
        int node0 = hopper.getLocationIndex().findClosest(51.354506642099615, 12.188172054026396, filter).getClosestNode();
        int node24594 = hopper.getLocationIndex().findClosest(51.35358593658177, 12.188015033036807, filter).getClosestNode();
        int node880 = hopper.getLocationIndex().findClosest(51.35171863477793, 12.18765554251497, filter).getClosestNode();

        list.add(new EdgeMatch(GHUtility.getEdge(graph, node0, node24594), Collections.<GPXExtension>emptyList()));

        // incorrect orientation
        list.add(new EdgeMatch(GHUtility.getEdge(graph, node880, node24594), Collections.<GPXExtension>emptyList()));